package redislock;

import org.redisson.Redisson;
import org.redisson.config.Config;

public class RedisManager
{
    private static Config config = new Config();
    //声明redisson对象
    private static Redisson redisson = null;
    //实例化redission
    static {
        config.useSingleServer().setAddress("redis://192.168.3.13:6379");
        //得到redisson对象
        redisson = (Redisson) Redisson.create(config);
    }

    //获取redission对象的方法
    public static Redisson getRedisson()
    {
        return redisson;
    }

}
